#include <stdio.h>
 
int main(int argc,const char * argv[])
{
 //定义变量
 int num1 = 100;
 int num2 = 200;
 //定义⼀个指针，执⾏num1变量的地址
 //int *p = &num1;
 //const修饰的指针的时候，会和其位置有关
 //const int *p = &num1;
 //int const *p = &num1;
 //int * const p = &num1;
 //常量指针
 const int * p = &num1;//const修饰的 * 表示
 printf("p = %p\n",p);
 printf("*p = %d\n",*p);
 //p = NULL;//改变指针变量的存储地址 可以修改
 //*p = 520; //不能改
 num1 = 530;
 printf("p = %p\n",p);
 printf("*p = %d\n",*p);
 return 0;
}